﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SNSpirit.Domain.User;

namespace SNSpirit.Domain.Mail
{
    public abstract class MailEntity : DomainEntity, IEquatable<MailEntity>
    {
        #region basic
        
        public UserEntity Sender { get; set; }

        public List<UserEntity> Receivers { get; set; }

        public string Title { get; set; }

        public MailContent Content { get; set; }

        #endregion

        #region state

        public ReadState ReadState { get; set; }

        public ReadState ReceiptReadState { get; set; }

        #endregion

        public override bool Equals(object obj)
        {
            if (obj == null || !(obj is MailEntity))
                return false;
            else
                return this.Equals(obj as MailEntity);
        }

        public override abstract int GetHashCode();

        public abstract bool Equals(MailEntity other);
    }
}
